﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonClasses
{
    public class WarHand : Hand
    {
        public delegate void Win(string x);
        public delegate void Lose(string y);
        public event Win Winner;
        public event Lose Loser;

        public override void calculate_total()
        {            
            if (CardsOnHand.Count() == 52)
            {
                if (Winner != null) Winner("You win the war!");
            }
            if (CardsOnHand.Count() == 0)
            {
                if (Loser != null) Loser("You lose the war!");
            }
        }
    }
}
